#pragma once
#include <cstdint>
#include <stdint.h>
#include <string>
#include <memory>

namespace Sivin {
  class SnImage {
  public:
    explicit SnImage(int w, int h, int channels, const void *data);
    ~SnImage();

  public:
    int width() const {
      return mWidth;
    }

    int height() const {
      return mHeight;
    }

    int channels() const {
      return mChannels;
    }

    std::unique_ptr<uint8_t> &data() {
      return mData;
    }

  public:
    static std::unique_ptr<SnImage> loadImage(std::string path);

  private:
    int mWidth{0};
    int mHeight{0};
    int mChannels;
    std::unique_ptr<uint8_t> mData{nullptr};
  };


}// namespace Sivin